-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Integrate archiveReports with ArchiveMetrics timer #23906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
7d18ad1 to
dd9f1d2
Compare
887b7ba to
f08ed6e
Compare
| $segmentObj | ||
| ); | ||
| if ($report) { | ||
| $parameters->setArchiveOnlyReport($report); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it relevant for the current metric gathering if a single report was requested? For example, when a new custom report is being archived?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've decided now to skip for individual reports, i've left the condition at this level, is that going to be confusing do you think, that there is a decision here and internally in the timer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not mean to add any skip-check here, I would actually not. The event handler should take care of not doing work on anything it receives but does not want.
Phrasing my question differently:
Would it make sense to add $report to the event signature? It is part of the
archiveReportssignature, and dropping it feels like a rather arbitrary decision.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now used and removed $shouldRecordMetrics
plugins/CoreAdminHome/tests/Integration/ArchiveReportsMetricsTimerTest.php
Outdated
Show resolved
Hide resolved
plugins/CoreAdminHome/tests/Integration/ArchiveReportsMetricsTimerTest.php
Outdated
Show resolved
Hide resolved
plugins/CoreAdminHome/tests/Integration/ArchiveReportsMetricsTimerTest.php
Outdated
Show resolved
Hide resolved
|
This issue is in "needs review" but there has been no activity for 7 days. ping @matomo-org/core-reviewers |
mneudert
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merging into main PR. Will add any comments (e.g. for the broken CI parts) there.
* Integrate archiveReports with ArchiveMetrics timer * Create event and hook timer into it * Add better typing * Make sure plugin is loaded for integration test * Skip metrics for single-report archiving * Add test-only timer reset helper * Simplify archive loader test GET handling * Add nullable type for instance * cs fix * Add strict types * Allow reports to have metrics recorded
* Integrate archiveReports with ArchiveMetrics timer * Create event and hook timer into it * Add better typing * Make sure plugin is loaded for integration test * Skip metrics for single-report archiving * Add test-only timer reset helper * Simplify archive loader test GET handling * Add nullable type for instance * cs fix * Add strict types * Allow reports to have metrics recorded
* Add archiving metrics code with timer * Pass in segment/period objects where possible * Make plugin not installed by default * Add support back in for segment archiving * Don't prematurely filter plugins * Add additional test for when archive PHP not triggered * Update UI Screenshots * Make archiving_metrics.idarchive not null * Store archiving period as numeric id * Store segment hash in archiving metrics * Derive ts_started from stored start time * Use mocks for Timer tests * Move ArchivingMetrics description to lang file * Tighten ArchivingMetrics integration test * Add strict types and license headers * Move context field extraction into writer * Update screenshots * Store done flag as archive name * Add support for report timings * Remove null check * Update index names * Add check to make sure idArchives array is always 1 * Update index name * Switch to date function * Remove date now() function * Add 'type' to $runs * Add clean up task for archive metrics (#23907) * Add clean up task for archive metrics * Add deleted-site purge for archiving metrics * Remove not needed setup/teardown * Add strict types * Update UI screenshot * Integrate archiveReports with ArchiveMetrics timer (#23906) * Integrate archiveReports with ArchiveMetrics timer * Create event and hook timer into it * Add better typing * Make sure plugin is loaded for integration test * Skip metrics for single-report archiving * Add test-only timer reset helper * Simplify archive loader test GET handling * Add nullable type for instance * cs fix * Add strict types * Allow reports to have metrics recorded * Update test to remove mocked 'now' * Remove report from archiving metrics context * Add report to context only * Clean up test * Update documented parameter order * Update tests to show full year <-> day cascading behaviour * Update expected UI test files --------- Co-authored-by: Marc Neudert <[email protected]>
Description
Integrates with this work #23902
Not every path is tested as the timer is tested in the other work.
Checklist
Review